<?php

/************************************** 不需要验证登录token的路由 **************************************/

/*安卓版本管理*/
Route::get('api_android_app_user', ['as' => 'api_android_app_user', 'uses' => 'AppController@android_app_user']);//用户端

/*微信登录*/
Route::post('api-wx_login', ['as' => 'api_wx_login', 'uses' => 'ThirdPartyController@wx_login']);//微信登录
Route::post('api-wx_bind_phone', ['as' => 'api_wx_bind_phone', 'uses' => 'ThirdPartyController@wx_bind_phone']);//微信绑定手机号
Route::post('api-bind_wechat', ['as' => 'api_bind_wechat', 'uses' => 'ThirdPartyController@bind_wechat']);//绑定微信


/*模拟支付*/
//Route::post('api-simulate_pay', ['as' => 'api_simulate_pay', 'uses' => 'OrderCheckpointController@simulate_pay']);//模拟支付
//Route::get('api-test_pay', ['as' => 'api_test_pay', 'uses' => 'OrderCheckpointController@test_pay']);//测试支付

/*登录*/
Route::post('api-send_phone_code', ['as' => 'api_send_phone_code', 'uses' => 'ApiController@send_phone_code']);//发送手机验证码
Route::post('api-phonecode_login_in', ['as' => 'api_phonecode_login_in', 'uses' => 'ApiController@phonecode_login_in']);//手机验证码登录
Route::post('api-phone_login_in', ['as' => 'api_phone_login_in', 'uses' => 'ApiController@phone_login_in']);//手机密码登录

/*其他*/
Route::get('api-checkpoint_open_city_and_area', ['as' => 'api_checkpoint_open_city_and_area', 'uses' => 'ShopCheckpointController@open_city_and_area']);//检测站开通城市以及辖区
Route::post('api-two_point_distance', ['as' => 'api_two_point_distance', 'uses' => 'ShopCheckpointController@two_point_distance']);//计算两个地理点的距离

/*行驶证识别*/
Route::post('api-vehicle_license_orc', ['as' => 'api-vehicle_license_orc', 'uses' => 'PublicController@vehicle_license_orc']);//识别机动车行驶证-转文字

/*车型查询 */
Route::get('api-vehicle_model_list', ['as' => 'api_vehicle_model_list', 'uses' => 'UsersVehicleController@vehicle_model_list']);//车型列表
Route::get('api-vehicle_model_top_list', ['as' => 'api_vehicle_model_top_list', 'uses' => 'UsersVehicleController@vehicle_model_top_list']);//车型列表-顶级-新

/*保险*/
Route::get('api-insurance_company_list', ['as' => 'api_insurance_company_list', 'uses' => 'InsuranceController@insurance_company_list']);//保险公司列表
Route::get('api-insurance_seed_list', ['as' => 'api_insurance_seed_list', 'uses' => 'InsuranceController@insurance_seed_list']);//保险公司险种列表

Route::get('api-all_province_and_city', ['as' => 'api_all_province_and_city', 'uses' => 'PublicController@all_province_and_city']);//省市数据-全部


/*车检维修专区*/
Route::get('api-shop_special_performance_index', ['as' => 'api_shop_special_performance_index', 'uses' => 'ShopController@shop_special_performance_index']);//车检维修专区-首页


/*检测机构*/
Route::get('api-checkpoint_list', ['as' => 'api_checkpoint_list', 'uses' => 'ShopCheckpointController@checkpoint_list']);//检测机构列表
Route::get('api-checkpoint_detail', ['as' => 'api_checkpoint_detail', 'uses' => 'ShopCheckpointController@checkpoint_detail']);//检测机构详情
Route::get('api-checkpoint_product_list', ['as' => 'api_checkpoint_product_list', 'uses' => 'ShopCheckpointController@checkpoint_product_list']);//检测机构-规格参数价目表
Route::get('api-checkpoint_appointment_day_nearly', ['as' => 'api_checkpoint_appointment_day_nearly', 'uses' => 'ShopCheckpointController@checkpoint_appointment_day_nearly']);//检测机构-近期预约日期列表
Route::get('api-checkpoint_apprise_list', ['as' => 'api_checkpoint_apprise_list', 'uses' => 'ShopCheckpointController@checkpoint_apprise_list']);//检测机构-车友评价列表

/*支付回调*/
Route::any('api-alipay_notify', ['as' => 'api_alipay_notify', 'uses' => 'PayController@alipay_notify']);//支付宝支付结果回调
Route::any('api-wxpay_notify', ['as' => 'api_wxpay_notify', 'uses' => 'PayController@wxpay_notify']);//微信支付结果回调

/*订单支付结果*/
Route::get('api-order_result', ['as' => 'api_order_result', 'uses' => 'PayController@order_result']);//订单支付结果


/************************************** 需要验证登录token的路由 **************************************/
Route::group(['middleware' => ['api_auth:api']], function () {

    /*爱车档案*/
    Route::get('api-user_default_car', ['as' => 'api_user_default_car', 'uses' => 'UsersVehicleController@user_default_car']);//用户默认车辆
    Route::get('api-my_company_list', ['as' => 'api_my_company_list', 'uses' => 'UsersVehicleController@my_company_list']);//我的企业列表
    Route::post('api-add_company', ['as' => 'api_add_company', 'uses' => 'UsersVehicleController@add_company']);//添加企业
    Route::delete('api-del_company', ['as' => 'api_del_company', 'uses' => 'UsersVehicleController@del_company']);//删除企业
    Route::post('api-edit_company', ['as' => 'api_edit_company', 'uses' => 'UsersVehicleController@edit_company']);//修改企业
    Route::get('api-company_vehicle_list', ['as' => 'api_company_vehicle_list', 'uses' => 'UsersVehicleController@company_vehicle_list']);//企业-车辆列表
    Route::post('api-add_user_vehicle', ['as' => 'api_add_user_vehicle', 'uses' => 'UsersVehicleController@add_user_vehicle']);//添加车辆-企业和非企业
    Route::post('api-edit_user_vehicle', ['as' => 'api_edit_user_vehicle', 'uses' => 'UsersVehicleController@edit_user_vehicle']);//修改车辆档案
    Route::put('api-set_default_user_vehicle', ['as' => 'api_set_default_user_vehicle', 'uses' => 'UsersVehicleController@set_default_user_vehicle']);//设置用户默认车辆
    Route::delete('api-del_user_vehicle', ['as' => 'api_del_user_vehicle', 'uses' => 'UsersVehicleController@del_user_vehicle']);//删除车辆
    Route::get('api-my_user_vehicle', ['as' => 'api_my_user_vehicle', 'uses' => 'UsersVehicleController@my_user_vehicle']);//我的车库
    Route::get('api-my_personal_vehicle_list', ['as' => 'api_my_personal_vehicle_list', 'uses' => 'UsersVehicleController@my_personal_vehicle_list']);//我的车辆列表
    Route::get('api-my_vehicle_info', ['as' => 'api_my_vehicle_info', 'uses' => 'UsersVehicleController@my_vehicle_info']);//首页进入车辆详情页
    Route::get('api-my_vehicle_info_company_list', ['as' => 'api_my_vehicle_info_company_list', 'uses' => 'UsersVehicleController@my_vehicle_info_company_list']);//首页进入车辆详情页-企业列表
    Route::get('api-my_vehicle_detail', ['as' => 'api_my_vehicle_detail', 'uses' => 'UsersVehicleController@my_vehicle_detail']);//用户车辆详情

    Route::get('api-company_vehicle_check_record', ['as' => 'api_company_vehicle_check_record', 'uses' => 'UsersVehicleController@company_vehicle_check_record']);//企业车辆检测记录


    //修改车辆信息
    Route::post('api-edit_vehicle_basic', ['as' => 'api_edit_vehicle_basic', 'uses' => 'UsersVehicleController@edit_vehicle_basic']);//修改车辆基本信息
    Route::post('api-edit_vehicle_insurance_info', ['as' => 'api_edit_vehicle_insurance_info', 'uses' => 'UsersVehicleController@edit_vehicle_insurance_info']);//修改车辆 保险信息


    /*年检预约-订单*/
    Route::post('api-checkpoint_apprise_submit', ['as' => 'api_checkpoint_apprise_submit', 'uses' => 'OrderCheckpointController@apprise_submit']);//检测机构-预约订单评价
//    Route::post('api-order_checkpoint_wechat_pay', ['as' => 'api_order_checkpoint_wechat_pay', 'uses' => 'OrderCheckpointController@wechat_pay']);//预约订单-微信支付
//    Route::post('api-order_checkpoint_ali_pay', ['as' => 'api_order_checkpoint_ali_pay', 'uses' => 'OrderCheckpointController@ali_pay']);//预约订单-支付宝支付
    Route::post('api-order_checkpoint_apply_refund', ['as' => 'api_order_checkpoint_apply_refund', 'uses' => 'OrderCheckpointController@apply_refund']);//预约订单-申请退款-整单
    Route::post('api-order_checkpoint_apply_refund_for_vehicle', ['as' => 'api_order_checkpoint_apply_refund_for_vehicle', 'uses' => 'OrderCheckpointController@apply_refund_for_vehicle']);//预约订单-申请退款-单个车辆
    Route::post('api-order_checkpoint_apply_refund_for_more_vehicle', ['as' => 'api_order_checkpoint_apply_refund_for_more_vehicle', 'uses' => 'OrderCheckpointController@apply_refund_for_more_vehicle']);//预约订单-申请退款(批量)-多选车辆
    Route::post('api-order_checkpoint_cancle', ['as' => 'api_order_checkpoint_cancle', 'uses' => 'OrderCheckpointController@cancle_order']);//预约订单-取消订单（未支付）
    Route::delete('api-order_checkpoint_user_del', ['as' => 'api_order_checkpoint_user_del', 'uses' => 'OrderCheckpointController@user_del_order']);//预约订单-用户删除
    Route::post('api-order_checkpoint_user_confirm_complete', ['as' => 'api_order_checkpoint_user_confirm_complete', 'uses' => 'OrderCheckpointController@confirm_complete']);//预约订单-确认完成

    //预约订单
    Route::get('api-user_checkpoint_order_list', ['as' => 'api_user_checkpoint_order_list', 'uses' => 'OrderCheckpointController@user_order_list']);//年检预约单列表
    Route::get('api-user_checkpoint_order_detail', ['as' => 'small_user_checkpoint_order_detail', 'uses' => 'OrderCheckpointController@user_order_detail']);//年检预约单详情

    //个人单
    Route::post('api-order_checkpoint_personal_goto_submit', ['as' => 'api_order_checkpoint_personal_goto_submit', 'uses' => 'OrderCheckpointController@personal_goto_submit']);//检测机构-个人单-到站检车-订单提交
    Route::post('api-order_checkpoint_personal_helpdrivingto_submit', ['as' => 'api_order_checkpoint_personal_helpdrivingto_submit', 'uses' => 'OrderCheckpointController@personal_helpdrivingto_submit']);//检测机构-个人单-代驾检车-订单提交

    Route::post('api-njyy_personal_change_to_helpdriving', ['as' => 'api_njyy_personal_change_to_helpdriving', 'uses' => 'OrderCheckpointController@change_to_helpdriving']);//检测机构-年检预约单-到站检车转为代驾


    //企业单
    Route::post('api-order_checkpoint_company_goto_submit', ['as' => 'api_order_checkpoint_company_goto_submit', 'uses' => 'OrderCheckpointController@company_goto_submit']);//检测机构-企业单-到站检车-订单提交

    /*年检预约-售后*/
    //预约订单-售后
    Route::get('api-checkpoint_order_aftersale_list', ['as' => 'api_checkpoint_order_aftersale_list', 'uses' => 'OrderCheckpointController@aftersale_list']);//预约订单售后列表
    Route::get('api-checkpoint_order_aftersale_detail', ['as' => 'api_checkpoint_order_aftersale_detail', 'uses' => 'OrderCheckpointController@aftersale_detail']);//预约订单售后详情

    /*支付*/
    Route::post('api-online_pay', ['as' => 'api_online_pay', 'uses' => 'PayController@online_pay']);//线上支付

    /*微信绑定模块*/
    Route::get('api-unbind_wechat', ['as' => 'api_unbind_wechat', 'uses' => 'ThirdPartyController@unbind_wechat']);//改绑微信

});

